home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / userbox / publicdomain / bootgauge / misc / header.txt < prev    next >
Text File  |  1996-05-11  |  19KB  |  514 lines

  1. /*
  2. **    $VER: BootGauge 0.9 (20 Apr 1996)  **
  3. **
  4. **       © 1995/1996 Timo C. Nentwig
  5. **          all rights reserved !
  6. **
  7. **       Tcn@techbase.in-berlin.de
  8. **
  9. **   ======================================
  10. **
  11. **
  12. **    Language:
  13. **    ¯¯¯¯¯¯¯¯
  14. **
  15. **      Program is compiled by SAS/C
  16. **
  17. **
  18. **    Purpose:
  19. **    ¯¯¯¯¯¯¯
  20. **
  21. **      Display gauge bar during booting
  22. **
  23. **
  24. **    Requirements:
  25. **    ¯¯¯¯¯¯¯¯¯¯¯¯
  26. **
  27. **      · AmigaOS 2+
  28. **      · gtlayout.library
  29. **
  30.  
  31. mod_Gauge's quit gadget doch GLOBAL, SIG_KILL an Main_proc schicken !
  32. IDCMP_DISKREMOVE scheint nicht beachted zu werden ...
  33. Req() funktioniert scheinbar nicht mit "%s" ... siehe failed commands
  34. split into program and bootgauge.library
  35. #define BOLD \33[1m etc.
  36. Use Req() also instead of printf()
  37.  
  38. ///"  Bugs"
  39. **
  40. **    Bugs:
  41. **    ¯¯¯¯
  42. **
  43. **      · Pictures (BitPlanes ?) sehen falsch aus.     [weber]
  44. **      · Palette der Pics -> Scr's palette
  45. **
  46. **      · scheinbar kann man per CLOSEWINDOW das Module nicht brauchbar abschießen
  47. **        ein Module kann ich nicht selbst abschießen ... ?!?!
  48. **
  49. **
  50. ///
  51. ///"  ToDo"
  52. **
  53. **    ToDo:
  54. **    ¯¯¯¯
  55. **
  56. **      · log file/verbose ?
  57. **      · if block handling
  58. **      · Die scheiß Gauge bar muß doch irgendwie auf 100% (nicht 101 und nicht 99) zu bringen sein
  59. **
  60. **      · /rkm/devices/audio/audio_8svx.c
  61. **      · Patches/Patch_Libs aus /Yak211/*.(c|h)
  62. **
  63. **
  64. **      -- -- Maybe: -- --
  65. **
  66. **     |· Farben selbt einstellbar (nicht aus der Palette, sondern selbt einstellbar !!): SetRGB32( &(BG_scr -> ViewPort), 0, r, g, b);
  67. **     |· Farben aus File lesbar: GetRGB32() or LoadRGB32()
  68. **
  69. ///
  70. ///"  Notes"
  71. **
  72. **    Notes:
  73. **    ¯¯¯¯¯
  74. **
  75. **      · TABs = 4
  76. **      · requires IEEE math library
  77. **      · Uses the MagicWB colors
  78. **
  79. **      Program has been testet with:  · AmigaGuardian
  80. **      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯   · memwatch.lib (SAS/C link library)
  81. **                                     · OS3.1 only !
  82. **
  83. ///
  84. **   --------------------------------------
  85. **
  86. **    History:
  87. **    ¯¯¯¯¯¯¯
  88. **
  89. /// "    0.1"
  90. **
  91. **  >>>>>>>>>>>    V0.1
  92. **                 ¯¯¯¯
  93. **  15 Sep 1995    first runable version
  94. **
  95. ///
  96. /// "    0.2"
  97. **
  98. **  >>>>>>>>>>>    V0.2
  99. **                 ¯¯¯¯
  100. **  17 Sep 1995    add: background image
  101. **                 add: -gc/-gaugecolor
  102. **                 add: background pattern
  103. **                 add: -sc/-screencolor
  104. **                 add: -nosr/-noscreenraster
  105. **                 add: -test
  106. **                 cng: background image
  107. **                 add: -cv/-viewcommand
  108. **                 add: FAILED_OPENSEQ
  109. **
  110. ///
  111. /// "    0.3"
  112. **
  113. **  >>>>>>>>>>>    V0.3
  114. **                 ¯¯¯¯
  115. **  20 Okt 1995    add: check: skip, failat, path
  116. **                 cng: set "BootGauge ..." before everything in titlebar
  117. **                 add: if/endif handling
  118. **                 cng: image handling: now using little img and put it a grid
  119. **                 add: window's x/y size is configureable
  120. **                 add: IText and gauge bar adapts automatically to window's size
  121. **                 add: gauge bar scale
  122. **                 add: -nopat/-nopattern
  123. **                 add: -wc/-windowcolor
  124. **                 add: -nosl/-noscale
  125. **                 add: -gbc/-gaugebackcolor
  126. **                 add: subprg: -getid/-getmodeid
  127. **                 fix: check if BG_win is too large for BG_scr
  128. **                 add: c = tolower(c);
  129. **                 fix: if handling now correct
  130. **                 fix: cmd handling now correct (skip/notitle, failat ...)
  131. **                 add: skip/lab handling
  132. **                 cng: BootGauge -> BG (prg-intern)
  133. **                 cng: image
  134. **                 cng: palette, using now 32bit palette (SA_Colors32)
  135. **                 add: -nodb/-nodebug
  136. **                 cng: -no* int -> BOOL
  137. **
  138. **  01 Nov 1995    add: -emod/-ecsmode
  139. **                 add: NO_COMMENT
  140. **
  141. **  >>>>>>>>>>>    Initial Release (AmiNet)
  142. **                 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  143. **
  144. ///
  145. /// "    0.4"
  146. **
  147. **  >>>>>>>>>>>    V0.4
  148. **                 ¯¯¯¯
  149. **  11 Nov 1995    cng: requester(str, var); (var argument)
  150. **                 fix: no esc signs in the titlebar anymore
  151. **                 cng: remove comments from titlebar string
  152. **                 add: -btxt/-boottext
  153. **                 add: struct TextAttr font = {...}
  154. **                 add: -notb/-notitlebar
  155. **                 add: subprg: FreeSpace
  156. **                 add: -fsx/freespacex
  157. **                 add: -fsy/freespacey
  158. **                 add: -fsc/freespacecolor
  159. **                 add: -fsx/freespacexs
  160. **                 add: -fstc/freespacetypecolor
  161. **                 add: -fsfc/freespacefypecolor
  162. **
  163. **  12 Nov 1995    add: subprg: MemSpace
  164. **                 add: -msx/memspacex
  165. **                 add: -msy/memspacey
  166. **                 add: -msc/memspacecolor
  167. **                 add: -msx/memspacexs
  168. **                 add: -mstc/memspacetypecolor
  169. **                 add: -msfc/memspacefontcolor
  170. **
  171. **  >>>>>>>>>>>>   Beta 1
  172. **                 ¯¯¯¯¯¯
  173. **                 rem: dead assignments in MemSpace.c
  174. **                 add: dummy, tmp perc value in MemSpace.c
  175. **
  176. **  13 Nov 1995    cng: title is now also set on BG_pat
  177. **                 add: menu: about, check marks: ms/fs/titlebar/quit
  178. **                 add: BG is now quitable (menu/quit)
  179. **                 add: menu shortcuts
  180. **                 add: default <sequence> is "sys:s/amiga-startup"
  181. **                 add: IDCMP_DISKINSERTED
  182. **                 cng: minior changes
  183. **                 cng: intern variable & config options
  184. **                 rem: scr_pattern
  185. **                 cng: new structure of source
  186. **                 add: -btxtfp/-boottextfrontpen
  187. **
  188. **  16 Nov 1995    add: IDCMP_DISKREMOVED
  189. **                 add: MS_putvalue();
  190. **                 rem: FAILED_MEMSPACE
  191. **
  192. **  17 Nov 1995    cng: overworked DC
  193. **                 add: -dcfp/-displaycmdfontpen
  194. **                 add: -dcx/-displaycmdx
  195. **                 add: -dcy/-displaycmdy
  196. **                 rem: -getid/-getmodeid/subprg:GetModeID();
  197. **                 cng: bootitext is centered between gauge bar and upper win frame
  198. **                 cng: complete CLI commands (eg. no alternative)
  199. **                 cng: Process_Seq() -> DoSeq()
  200. **                 fix: bg started with -noms/-nofs and during running started by menu -> open at y = 0 (titlebar)
  201. **
  202. ///
  203. /// "    0.5"
  204. **
  205. **  >>>>>>>>>>>    V0.5
  206. **                 ¯¯¯¯
  207. **  01 Dec 1995    cng: BG_win now using gtlayout
  208. **                 add: 3D frame for BG_win
  209. **                 cng: many minior adjustments (variables, options ...)
  210. **                 cng: all is now using gtlayout
  211. **                 cng: now using WA_BackFill
  212. **                 cng: uses much less mem
  213. **                 fix: bootgauge didn't free all memory
  214. **                 cng: completely overworked (more sources)
  215. **                 rem: many options (in cause of gtlayout)
  216. **
  217. **  06 Dec 1995    add: ListCmd()
  218. **                 add: LC_putvalue()
  219. **                 add: LC_ShutDown()
  220. **
  221. **  07 Dec 1995    add: CreateNode()
  222. **                 fix: LC_putvalue now works
  223. **
  224. **  09 Dec 1995    cng: -winpen (background color) now for all windows
  225. **                 add: check if OS3+ is available
  226. **                 add: SysInfo ()
  227. **
  228. **  12 Dec 1995    add: OpenLib() [Olaf Barthel]
  229. **                 fix: func = (VOID *) (  (* ( (APTR *)(((struct MenuItem *) n )+1) ) )  );
  230. **                 cng: BG_OpenWindow() -> GaugeBar()
  231. **                 cng. BG_CloseWindow() -> GB_ShutDown()
  232. **                 cng: on/off: gauge bar is now extern
  233. **
  234. **  13 Dec 1995    add: IDCMP handle for all windows
  235. **                 add: routine to get builtin memory size
  236. **                 cng: MemSpace now featuring also gauge bars
  237. **                 add: SysInfo: CPU, FPU
  238. **                 cng: Now using a GST file (wow !, fast !)
  239. **                 cng: compiling with option: optschedule
  240. **
  241. **  17 Dec 1995    cng: finished source splitting
  242. **                 add: SysInfo: Chip set
  243. **                 fix: little layout correction in MemSpace()
  244. **                 add: TimeInfo()
  245. **
  246. **  18 Dec 1995    add: CPUInfo()
  247. **                 cng: menu updated (TimeInfo, CPUInfo) and sorted (alphabetic)
  248. **                 cng: cleaned up unused/old/unrequired variables
  249. **                 cng: names of some variables
  250. **
  251. **  19 Dec 1995    add: menu item for GaugeBar()
  252. **                 cng: now use normal instead of checking menus
  253. **
  254. **  20 Dec 1995    cng: bgTimeInfo.c now also displays the seconds
  255. **
  256. ///
  257. /// "    0.6"
  258. **
  259. **  >>>>>>>>>>>    V0.6
  260. **                 ¯¯¯¯
  261. **  22 Dec 1995    cng: Requester() accepts now arguments
  262. **                 cng: MemSpace runs in its own task
  263. **
  264. **  23 Dec 1995    add: SetClickDrive()
  265. **                 cng: overworked a bit and made safer
  266. **                 cng: overworked OpenScr(), screen is now really public
  267. **                 fix: TimeInfo(), e.g. 22:1:5 instead of 22:01:05
  268. **                 fix: didn't recognize end of if-blocks
  269. **                 cng: don't copy more than 2 empty signs into line[] "ab     c" -> "ab c"
  270. **                 cng: titlebar format and use sprintf() for making title_text
  271. **                 rem: nline[]
  272. **                 cng: line[]: no comments, no '\n'
  273. **                 fix: -noreq now takes no effect to Menu/About
  274. **                 fix: problem with comments (ESC sign was shown)
  275. **
  276. **  25 Dec 1994    add: -drvclick
  277. **                 add: -nobborder; BlackBorder()
  278. **                 add: now it is possible to use a config file if available
  279. **                 cng: overworked DoSeq(): use now fgets(), line is now case-sensitiv (for rename, ...)
  280. **                 add: lower()
  281. **                 add: upper()
  282. **                 add: check result of system(), display error, warn, ... in requester
  283. **                 add: count of system()'s failures are displayed in DisplayCmd
  284. **
  285. **  >>>>>>>>>>>    Beta 1
  286. **                 ¯¯¯¯¯¯
  287. **  28 Dec 1995    add: InitBackFill();
  288. **                 cng: scr's depth defineable
  289. **                 cng: default scr depth 3, use MagicWB colors
  290. **                 cng: DriPens[] (e.g. active title bar text is now white)
  291. **                 cng: overworked Menu_About() a little bit
  292. **                 rem: variable for sub prgs: si, ms, fs, ti, dc, gb, ci; now check if window is open/task is running
  293. **                 rem: menu item for sub programs and titlebar, was simply nonsense
  294. **                 cng: workaround: if titlebar is enabled MoveWindow() [MS, CI, FS] don't overwrite title bar
  295. **                 cng: now just execute path and alias
  296. **                 add: -failat, default = 21;
  297. **                 cng: names of sub programs (and its variables[windows, handle, open_*]), now called "modules"
  298. **                 cng: names of all files (bg_* and mod_*)
  299. **                 cng: better structure
  300. **                 cng: screen title now for all windows
  301. **                 cng: window title of mod_Gauge
  302. **                 fix: if scr's title bar was off, title bar of mod_Text wasn't updated
  303. **
  304. **  29 Dec 1995    cng: general config structure
  305. **                 fix: several minior bugs, didn't free some bytes
  306. **                 add: dri_pens[] are now defineable
  307. **                 cng: updated evaluateCfg/Args(), now you can configure everything ;-)
  308. **
  309. **  30 Dev 1995    cng: Menu now in win_Main
  310. **                 cng: win_Main is now the default active window
  311. **                 cng: Screen title bar text now defineable
  312. **
  313. **
  314. **
  315. **  01 Jan 1996    cng: better infos than just "OpenLibs()" failed
  316. **
  317. **  03 Jan 1996    fix: [Yak:] ClickDrive() didn't free (2 * 56)  = 112 bytes
  318. **                 add: Window's pos is saved automatically
  319. **                 add: POS config file for modules
  320. **                 cng: move bg's confgi files in a own dir
  321. **
  322. **  05 Jan 1996    add: Exists()
  323. **                 add: ByteCopy()
  324. **                 add: MakeDir()
  325. **                 cng: SaveWinPos() now writes also in env:
  326. **                 cng: now mod_Devs supports again IDCMP_DISKINSERTED
  327. **
  328. **  >>>>>>>>>>>    Beta 2
  329. **                 ¯¯¯¯¯¯
  330. **  08 Jan 1996    cng: mod_Gauge: CloseGadget just quit mod_Gauge not whole app
  331. **                 cng: IDs now in the files where they are used (removed from GST) and using enum{}
  332. **                 cng: mod_Time: now all gadgets are updated
  333. **                 cng: module's gadgets are build by for () [code optimized]
  334. **
  335. **  09 Jan 1996    add: Font is now defineable
  336. **
  337. **  13 Jan 1996    cng: removed mod_Mem task, mod_Mem now runs directly again
  338. **                 fix: forgot WA_NewLookMenus, TRUE, in win_Main
  339. **                 add: Menu item: Wait [e.g. for pos windows]
  340. **
  341. **  14 Jan 1996    cng: now using reqtools.library for requesters
  342. **
  343. **  16 Jan 1996    add: much more error messages for system()
  344. **                 cng: Requester() -> rprintf ()
  345. **                 cng: improved rprintf () using va_list
  346. **
  347. ///
  348. /// "    0.7"
  349. **
  350. **  >>>>>>>>>>>    V0.7
  351. **                 ¯¯¯¯
  352. **  19 Jan 1996    add: SetMousePos()
  353. **
  354. **  25 Jan 1996    fix: SetMousePos(): used Pubscreen -> Workbench poped up
  355. **                 fix: SetMousePos() didn't free some bytes
  356. **                 fix: many minior fixes, e.g. files/devices/libs may not have been closed
  357. **
  358. **  26 Jan 1996    cng: rprintf() call wait pointer
  359. **                 add: SetPointerAll()
  360. **                 add: SetTitlePointer()
  361. **                 cng: scr_Main is SA_Behind and first switched to front after opening win_Main
  362. **                 add: use of DriveClick() is defineable
  363. **                 add: use of BlackBorder() is defineable
  364. **                 rem: setmouse is now always set and not longer defineable
  365. **                 rem: requester cannot be disabled anymore
  366. **                 cng: config structure overworked
  367. **
  368. **  27 Jan 1996    rem: mod_CPU, SysInfo.library can only be used if Executive is running
  369. **
  370. **  05 Feb 1996    add: fgetsf(), formated replacement for fgets()
  371. **                 cng: mod_Text: WARNs, FAILs, ERRORs, OTHERs are white colored
  372. **
  373. **  06 Feb 1996    add: parseline()
  374. **                 fix: strpos()
  375. **                 cng: DoSeq() -> ExecuteSeq()
  376. **                 cng: ExecuteSeq() rewritten for more compatibility
  377. **                 add: CheckResult()
  378. **                 cnd: lower() -> str2lwr()
  379. **                 cnd: upper() -> str2upr()
  380. **
  381. **  08 Feb 1996    fix: fgetsf(): isalpha (...) -> if (c != ' ' && c != '\t')
  382. **                 fix: strpos(): UBYTE -> BYTE, e.g. "\"" wasn't handled correctly
  383. **                 cng: improved strpos(): finds now specified occurance of keyword and not just the first
  384. **                 fix: parseline(): UBYTE -> BYTE, e.g. "\"" wasn't handled correctly
  385. **                 fix: parseline(): now handle commands in quotation marks correct, e.g. "c:my command"
  386. **                 add: more error msg for failed commands
  387. **
  388. **  09 Feb 1996    cng: GetFastMemSize()/GetChipMemSize() -> GetSizeMem()
  389. **
  390. **  10 Feb 1996    cng: strpos(): smaller and improved speed a bit
  391. **
  392. **  13 Feb 1996    cng: SetupConfig() -> SetDefaults()
  393. **                 cng: default <seq> is now sys:s/system-startup
  394. **                 cng: GetDay(), GetDate(), GetTime() -> GetDDT()
  395. **
  396. **  14 Feb 1996    fix: Problems with urouhack and DrawFrame() [borders were hand-calculated, not win -> Border???]
  397. **                 cng: string functions are not limited to STR_LEN anymore
  398. **
  399. **  17 Feb 1996    cng: GetDDT() now uses strftime(): time is completely configurable
  400. **
  401. **  19 Feb 1996    cng: strcmp (str2lwr (...), ...) replaced with stricmp (...)
  402. **                 rem: str2lwr ()
  403. **                 rem: str2upr ()
  404. **
  405. **  20 Feb 1996    rem: substr(): replaced with strmid ()
  406. **                 fix: memory leak in GetDDT ()
  407. **
  408. **  23 Feb 1996    fix: all memory leaks !
  409. **
  410. **  24 Feb 1996    add: Say(): speak a text using narrator.device
  411. **                 add: cfg -> say.*
  412. **
  413. **  24 Feb 1996    add: strwrd()
  414. **
  415. **  25 Feb 1996    cng: fopen(), fclose(), fgetc, ... -> Open(), Close(), FGetC, ...
  416. **
  417. **  01 Mar 1996    fix: sequence wasn't unlocked if user canceled program
  418. **
  419. **  02 Mar 1996    cng: made again a little bit safer
  420. **                 cng: several minior changes
  421. **
  422. **  09 Mar 1996    add: DisplayBeep(), Say() if an error happens
  423. **                 cng: very much very little changes in the whole code
  424. **                 add: Macro: Div()
  425. **                 add: CreateBitMap()
  426. **                 add: DeleteBitMap()
  427. **
  428. **  16 Mar 1996    cng: mod_Sys(): code reduced
  429. **                 cng: mod_Sys(): runs in its own process
  430. **                 add: cfg -> mod.Sys.highlabel
  431. **
  432. **  17 Mar 1996    add: About window
  433. **
  434. **  18 Mar 1996    add: Quit menu item for mod_Sys
  435. **                 cng: mod_Sys: optimized
  436. **
  437. **  22 Mar 1996    add: mod_Sys is quitted by pressing '\033' = escape
  438. **
  439. **  24 Mar 1996    add: Menu item: Reboot
  440. **                 add: elementary Req()
  441. **
  442. **  26 Mar 1996    cng: window snapping defineable
  443. **                 cng: snap window only if its position has changed
  444. **
  445. **  29 Mar 1996    cng: Shell arguments are now evaluated by RDArgs()
  446. **                 cng: Prototype is now defined in SCOptions
  447. **
  448. **  30 Mar 1996    rem: picture support [at least for the windows]
  449. **                 cng: improved GetMemSize(), now using MEMF_*
  450. **                 fix: mod_Mem works again
  451. **                 rem: Say(), narrator.device support
  452. **
  453. **  >>>>>>>>>>>    Beta 1
  454. **                 ¯¯¯¯¯¯
  455. **
  456. ///
  457. /// "    0.8"
  458. **
  459. **  >>>>>>>>>>>    V0.8
  460. **
  461. **  02 Apr 1996    cng: mod_Devs now also runs in its own process
  462. **
  463. **  07 Apr 1996    cng: overworked all modules
  464. **                 rem: percent couting in titlebar of mod_Gauge & mod_Text
  465. **                 cng: process creating/removing much safer
  466. **                 add: security inquiry for ColdReboot () by Req ()
  467. **                [cng: Prototypes are now introduced by "PROTO", rewrote DICE's MakeProto]
  468. **                 add: Req () replacing RPintF()
  469. **                 add: 2 MagicWB images for Req ()
  470. **
  471. ///
  472. /// "    0.9"
  473. **
  474. **  >>>>>>>>>>>    V0.9
  475. **
  476. **  09 Apr 1996    cng: all modules now work in their own process !!!
  477. **                 cng: mod_Gauge's quit gadget doesn't quit program but module only
  478. **
  479. **  11 Apr 1996    add: delay option for testing
  480. **
  481. **  12 Apr 1996    add: timer.device process updating considering modules every second
  482. **                 add: menu item: NewShell
  483. **
  484. **  13 Apr 1996    rem: titlecmd
  485. **                 add: isempty ()
  486. **                 cng: FGetsF (): more flexible and improved
  487. **                 cng: rewrote EvalPrefs(): shorter and faster
  488. **
  489. **  15 Apr 1996    fix: SingleCLI: STRING_KIND string wasn't terminated
  490. **
  491. **  >>>>>>>>>>>    Beta 1
  492. **                 ¯¯¯¯¯¯
  493. **
  494. **  20 Apr 1996   [add: elementary Installer script]
  495. **
  496. **  21 Apr 1996    cng: internal failat removed, DOS failat used
  497. **
  498. **  23 Apr 1996   [cng: overworked guide: much more flexible now]
  499. **
  500. **  29 Apr 1996    cng: more info if OpenScr() failed (WA_ErrorCode)
  501. **
  502. **  11 May 1996    add: mod_Sys: MMU
  503. **
  504. **  >>>>>>>>>>>    Beta 2
  505. **                 ¯¯¯¯¯¯
  506. **
  507. **  >>>>>>>>>>>    Second Release (AmiNet)
  508. **                 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  509. **
  510. ///
  511. **
  512. */
  513.  
  514.